import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import * as Icons from '@element-plus/icons'
import 'element-plus/dist/index.css'
import { library } from '@fortawesome/fontawesome-svg-core';  
import { faUserSecret } from '@fortawesome/free-solid-svg-icons';  
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';  
import App from './App.vue'
import pkg from '../package.json'
const app =createApp(App)
// 注册Icons 全局组件
Object.keys(Icons).forEach(key => {
  app.component(key, Icons[key])
})

app.use(ElementPlus)
library.add(faUserSecret)
app.component('font-awesome-icon', FontAwesomeIcon);  
// 从package.json中获取version 版本，保存在app属性上，供Vue实例使用
app.config.globalProperties.pkgVersion = pkg.version
app.mount('#app')